package com.zyh.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.annotations.Param;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comment {
    Integer id;
    String context;
    Integer uid;
    //    后端向前端传
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
//    前端向后端传
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    Date createDate;
    Integer sid;
    Integer parentId;
    User user;
    List<Comment> commentList;
}
